1400 |
Is it possible to define my values for sorting
Dim h With Exg2antt1 .Columns.Add("C1").SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortUserDataString .Columns.Add("C2") With .Items h = .AddItem("Cell 1") .set_CellData(h,0,"3.your extra data") .set_CellValue(h,1,"SortValue=3") h = .AddItem("Cell 1.1") .set_CellData(h,0,"1.your extra data") .set_CellValue(h,1," SortValue=1") h = .AddItem("Cell 1.2") .set_CellData(h,0,"5.your extra data") .set_CellValue(h,1," SortValue=5") h = .AddItem("Cell 1.3") .set_CellData(h,0,"2.your extra data") .set_CellValue(h,1," SortValue=2") End With End With |
1399 |
I have multiple dropdown lists, that are depending on each other, that means that the values in dropdown list no. 2 is based on the users selection in dropdown list no 1. How can I do this
' EditOpen event - Occurs when the edit operation starts. Private Sub Exg2antt1_EditOpen(ByVal sender As System.Object) Handles Exg2antt1.EditOpen Dim c,v With Exg2antt1 With .Items v = .get_CellValue(.FocusItem,0) c = .get_CellCaption(.FocusItem,0) End With With .Columns.Item(1).Editor .ClearItems() .AddItem(v,c) End With End With End Sub Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) With .Columns.Add("DropDownList") With .Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DropDownListType .AddItem(1,"First") .AddItem(2,"Second") .AddItem(3,"Third") End With End With .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .Columns.Add("DropDownList-Related").Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DropDownListType With .Items .set_CellValue(.AddItem(1),1,-1) .set_CellValue(.AddItem(2),1,-1) .set_CellValue(.AddItem(3),1,-1) .set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exBottom,1) h = .get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exBottom,0) .set_ItemDivider(h,0) .set_ItemDividerLineAlignment(h,exontrol.EXG2ANTTLib.DividerAlignmentEnum.DividerTop) .set_CellEditorVisible(h,0,exontrol.EXG2ANTTLib.EditorVisibleEnum.exEditorHidden) .set_CellSingleLine(h,0,exontrol.EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap) .set_CellValueFormat(h,0,exontrol.EXG2ANTTLib.ValueFormatEnum.exHTML) .set_CellValue(h,0,"The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection" & _ " on the first column.") End With .EndUpdate() End With |
1398 |
Is it possible background color displayed when the mouse passes over an item
With Exg2antt1 .BeginUpdate() .Columns.Add("Def") .HotBackColor = Color.FromArgb(0,0,128) .HotForeColor = Color.FromArgb(255,255,255) With .Items .AddItem("Item A") .AddItem("Item B") .AddItem("Item C") End With .EndUpdate() End With |
1397 |
Is it possible to magnify a specified date and apply a different background color
Dim hA,hB With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .DrawLevelSeparator = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelNoLine .set_PaneWidth(False,64) .FirstVisibleDate = #11/23/2011# .LevelCount = 3 .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday .AllowInsideZoom = True .InsideZooms.Add(#11/29/2011#).AllowCustomFormat = True With .InsideZooms.Item(#11/29/2011#) .Width = 68 .CustomFormat.BackColorChart = Color.FromArgb(224,224,224) End With End With With .Items hA = .AddItem("Task A") .AddBar(hA,"Task",#11/24/2011#,#11/26/2011#,"A") hB = .AddItem("Task B") .AddBar(hB,"Task",#11/28/2011#,#12/1/2011#,"B") .AddLink("LinkAB",hA,"A",hB,"B") .set_Link("LinkAB",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkStyle,2) .set_Link("LinkAB",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkWidth,2) End With .EndUpdate() End With |
1396 |
Could you please tell me how to add multiple bars to the one line
Dim h With Exg2antt1 .BeginUpdate() .Chart.FirstVisibleDate = #1/1/2002# .Columns.Add("Task") With .Items h = .AddItem("Task") .AddBar(h,"Task",#1/2/2002#,#1/4/2002#,"A") .AddBar(h,"Task",#1/6/2002#,#1/10/2002#,"B") .set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255) .AddLink("AB",h,"A",h,"B") End With .EndUpdate() End With |
1395 |
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed
Dim h1,h2 With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .Chart.FirstVisibleDate = #1/1/2001# With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"K1") h2 = .AddItem("Task 2") .AddBar(h2,"Task",#1/5/2001#,#1/7/2001#,"K2") .AddLink("L1",h1,"K1",h2,"K2") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0) End With .EndUpdate() .Template = "Dim p;p = CreateObject(`Exontrol.Print`);p.PrintExt = Me;p.AutoRelease = False;p.Preview();" End With |
1394 |
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed
Dim h1,h2 With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .Chart.FirstVisibleDate = #1/1/2001# With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#,"K1") h2 = .AddItem("Task 2") .AddBar(h2,"Task",#1/5/2001#,#1/7/2001#,"K2") .AddLink("L1",h1,"K1",h2,"K2") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0) End With .EndUpdate() ' Add 'exontrol.exprint.dll(ExPrint.dll)' reference to your project. With New exontrol.EXPRINTLib.exprint() .PrintExt = Exg2antt1.ExecuteTemplate("me") .Preview() End With End With |
1393 |
Is it possible to display the bar's captions or labels with a different font/size
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Task") .DefaultItemHeight = 24 With .Chart .set_PaneWidth(False,64) .FirstVisibleDate = #1/1/2001# .LevelCount = 2 End With With .Items h = .AddItem("Default") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"","This is a the control's font") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) h = .AddItem("Smaller") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"","<font ;5>This is a the control's font with a smaller size") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) h = .AddItem("Larger") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"","<font ;15>This is a the control's font with a larger size") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) h = .AddItem("Tahoma 1") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"","<font Tahoma>This is using a Tahoma font") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) h = .AddItem("Tahoma 2") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"","<font Tahoma;14>This is using a <b>Tahoma</b> font with a different size") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) End With .EndUpdate() End With |
1392 |
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)
With Exg2antt1 .BeginUpdate() With .ConditionalFormats.Add("1","K1") .BackColor = Color.FromArgb(255,0,0) .ApplyTo = &H1 End With With .ConditionalFormats.Add("1","K2") .BackColor = Color.FromArgb(255,0,0) .ApplyTo = &H2 End With .MarkSearchColumn = False .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines With .Columns .Add("Column 1") .Add("Column 2") .Add("Column 3") End With With .Items .AddItem() .AddItem() .AddItem() End With .EndUpdate() End With |
1391 |
Is it possible to change the height for all items at once
Dim h With Exg2antt1 .BeginUpdate() .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .Columns.Add("Items") With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(0,True) End With .EndUpdate() .DefaultItemHeight = 12 .Items.set_ItemHeight(0,12) End With |
1390 |
Is it possible to include the weekday when displaying the date
With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False With .Columns .Add("Tasks") With .Add("Start") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .FormatColumn = "value + '<font ;6> ' + (weekday(date(value)) case(0:'Sun';1:'Mon';2:'Tue';3:'Wed';4:'Thu';5:'Fri';6:'Sat'))" End With With .Add("End") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .FormatColumn = "value + '<font ;6> ' + (weekday(date(value)) case(0:'Sun';1:'Mon';2:'Tue';3:'Wed';4:'Thu';5:'Fri';6:'Sat'))" End With End With With .Chart .FirstVisibleDate = #9/20/2006# .AllowLinkBars = False .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .LevelCount = 2 .set_PaneWidth(False,256) .NonworkingDays = 0 .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday End With With .Items .AllowCellValueToItemBar = True .AddBar(.AddItem("Task 1"),"Task",#9/21/2006#,#9/24/2006#) .AddBar(.AddItem("Task 2"),"Task",#9/22/2006#,#9/25/2006#) .AddBar(.AddItem("Task 3"),"Task",#9/23/2006#,#9/26/2006#) End With .EndUpdate() End With |
1389 |
I need my chart to display the end date with on day less. How can I do this (Method 1)
With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False With .Columns .Add("Tasks") .Add("Start").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) With .Add("End") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .FormatColumn = "shortdate(date(value)-1)" End With End With With .Chart .FirstVisibleDate = #9/20/2006# .AllowLinkBars = False .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .LevelCount = 2 .set_PaneWidth(False,196) .NonworkingDays = 0 End With With .Items .AllowCellValueToItemBar = True .AddBar(.AddItem("Task 1"),"Task",#9/21/2006#,#9/24/2006#) .AddBar(.AddItem("Task 2"),"Task",#9/22/2006#,#9/25/2006#) .AddBar(.AddItem("Task 3"),"Task",#9/23/2006#,#9/26/2006#) End With .EndUpdate() End With |
1388 |
Is it possible to display my custom time-units
With Exg2antt1 With .Chart .set_PaneWidth(False,0) .LevelCount = 2 .FirstVisibleDate = 0 .NonworkingDays = 0 With .get_Level(0) .Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay .Count = 16 .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Label = "<%i%>" .FormatLabel = "'Half ' + (1 + (value/16) mod 2)" End With With .get_Level(1) .Label = "<%i%>" .FormatLabel = "1 + value mod 16" .set_ReplaceLabel(2,"<font ;10><B>Y") End With .AdjustLevelsToBase = True .set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exStartDate,0) .set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exEndDate,31) End With End With |
1387 |
Is it possible to add new records and see them in the control's view using the DataSource
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .set_SelectItem(Item,True) .EnsureVisibleItem(Item) End With .Edit(0) End With End Sub ' ButtonClick event - Occurs when user clicks on the cell's button. Private Sub Exg2antt1_ButtonClick(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer,ByVal Key As Object) Handles Exg2antt1.ButtonClick With Exg2antt1 .DataSource.AddNew() End With End Sub Dim h,rs With Exg2antt1 rs = New ADODB.Recordset() With rs.Fields .Append("Task",8) .Append("Start",7) .Append("End",7) End With rs.Open() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines .DetectAddNew = True .DetectDelete = True .DataSource = rs With .Items .set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,1) h = .get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,0) .set_ItemDivider(h,0) .set_ItemHeight(h,22) .set_CellValue(h,0,"AddNew") .set_CellHasButton(h,0,True) .set_CellHAlignment(h,0,exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment) End With End With |
1386 |
How can I limit the bars to scrolling range only
' CreateBar event - Fired when the user creates a new bar. Private Sub Exg2antt1_CreateBar(ByVal sender As System.Object,ByVal Item As Integer,ByVal DateStart As Date,ByVal DateEnd As Date) Handles Exg2antt1.CreateBar With Exg2antt1 With .Items .set_ItemBar(Item,"newbar",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart,Exg2antt1.Chart.get_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exMinDate)) .set_ItemBar(Item,"newbar",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd,Exg2antt1.Chart.get_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exMaxDate)) End With End With End Sub With Exg2antt1 .BeginUpdate() .Columns.Add("Task") With .Chart .LevelCount = 2 .set_PaneWidth(False,56) .set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exStartDate,#1/1/2001#) .set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exEndDate,#1/15/2001#) .FirstVisibleDate = #1/12/2001# .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exCreateBarAuto End With With .Items .AddItem("Task 1") .AddItem("Task 2") .AddItem("Task 3") End With .EndUpdate() End With |
1385 |
How do I get the handle of the last added item
With Exg2antt1 .Columns.Add("Def") With .Items .AddItem(1) .AddItem(2) Debug.Print( .get_ItemByIndex(.ItemCount) ) End With End With |
1384 |
How can I set the charts date format to any other international Format then the US version. I would need "dd.mmm.yyyy" instead of "mmm.d.'yy"
With Exg2antt1 With .Chart .set_PaneWidth(False,0) .LevelCount = 2 With .get_Level(0) .Label = "<%dd%>.<%mmm%>.<%yyyy%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exWeek .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside Or exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment End With End With End With |
1383 |
Is it possible to define the bar colors, and have the cumulative histogram showing the same colors
Dim h,h1 With Exg2antt1 .BeginUpdate() .SingleSel = False With .Chart .LevelCount = 2 .AllowLinkBars = False .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .FirstVisibleDate = #12/24/2000# .HistogramVisible = True .HistogramHeight = 64 .set_PaneWidth(False,128) .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems With .Bars.Item("Task") .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistCumulative .HistogramItems = 6 .HistogramPattern = .Pattern .HistogramCumulativeOriginalColorBars = exontrol.EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset End With End With .Columns.Add("Column") With .Items h = .AddItem("Project") .set_ItemBold(h,True) .set_SelectableItem(h,False) h1 = .InsertItem(h,Nothing,"Item 1") .AddBar(h1,"Task",#1/2/2001#,#1/4/2001#) h1 = .InsertItem(h,Nothing,"Item 2") .AddBar(h1,"Task",#1/3/2001#,#1/5/2001#) h1 = .InsertItem(h,Nothing,"Item 3") .AddBar(h1,"Task",#1/4/2001#,#1/6/2001#) .AddBar(h1,"Task",#1/1/2001#,#1/3/2001#,"green") .set_ItemBar(h1,"green",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280) .AddBar(h1,"Task",#1/8/2001#,#1/10/2001#,"red") .set_ItemBar(h1,"red",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255) .set_ExpandItem(h,True) .SelectAll() End With .EndUpdate() End With |
1382 |
How can I hide the values shown in the legend when cumulative histogram is displayed
Dim h With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #1/1/2001# .HistogramVisible = True .HistogramHeight = 64 .set_PaneWidth(False,128) .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems With .Bars.Item("Task") .HistogramPattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistCumulative .HistogramItems = 6 .HistogramRulerLinesColor = Color.FromArgb(128,0,0) .HistogramBorderColor = Color.FromArgb(1,0,0) .HistogramCumulativeShowLegend = 65535 .HistogramCumulativeOriginalColorBars = exontrol.EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exChangeColor End With End With With .Columns.Add("Column") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True End With With .Items h = .AddItem("Project 1") .AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#) .AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#) .AddBar(.InsertItem(h,Nothing,"Item 3"),"Task",#1/4/2001#,#1/6/2001#) .AddBar(.InsertItem(h,Nothing,"Item 4"),"Task",#1/2/2001#,#1/8/2001#) .set_CellState(.get_ItemByIndex(1),0,1) .set_ExpandItem(h,True) End With .EndUpdate() End With |
1381 |
Is it possible to define the bar colors, and have the cumulative histogram showing the same colors
Dim h With Exg2antt1 .BeginUpdate() .SelBackColor = .BackColor .SelForeColor = .ForeColor With .Chart .FirstVisibleDate = #1/1/2001# .HistogramVisible = True .HistogramHeight = 64 .set_PaneWidth(False,128) .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems With .Bars.Item("Task") .Color = Color.FromArgb(128,128,128) .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistCumulative .HistogramItems = 6 .HistogramRulerLinesColor = Color.FromArgb(128,0,0) .HistogramBorderColor = Color.FromArgb(1,0,0) .HistogramCumulativeColors = 2 .set_HistogramCumulativeColor(0,Color.FromArgb(0,0,255)) .set_HistogramCumulativeColor(1,Color.FromArgb(0,0,255)) .HistogramCumulativeOriginalColorBars = exontrol.EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exChangeColor .HistogramPattern = .Pattern .HistogramCumulativeShowLegend = 65535 End With End With With .Columns.Add("Column") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .PartialCheck = True End With With .Items h = .AddItem("Project 1") .AddBar(.InsertItem(h,Nothing,"Item 1"),"Task",#1/2/2001#,#1/4/2001#) .AddBar(.InsertItem(h,Nothing,"Item 2"),"Task",#1/3/2001#,#1/5/2001#) .AddBar(.InsertItem(h,Nothing,"Item 3"),"Task",#1/4/2001#,#1/6/2001#) .AddBar(.InsertItem(h,Nothing,"Item 4"),"Task",#1/2/2001#,#1/8/2001#) .set_CellState(.get_ItemByIndex(1),0,1) .set_ExpandItem(h,True) End With .EndUpdate() End With |
1380 |
Is it possible to show the non-working pattern over the bars
With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .NonworkingDaysPattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal .NonworkingDaysColor = Color.FromArgb(0,0,0) .set_PaneWidth(False,40) .FirstVisibleDate = #6/20/2005# .HistogramVisible = True .HistogramHeight = 64 .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramBackground Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems .LevelCount = 2 With .Bars With .Add("Empty") .Color = Color.FromArgb(0,0,0) .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternFDiagonal .Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeSolidFrameless End With With .Add("Task:Empty") .Shortcut = "Task" .HistogramItems = -5 .HistogramCriticalValue = 3 .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistOverload .HistogramPattern = .Pattern .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=%258%> working days bar") .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) End With End With .UnitWidthNonworking = -12 .get_Level(1).FormatLabel = "weekday(dvalue) in (0,6) ? `` : value" End With With .Items .AddBar(.AddItem("Task A"),"Task",#6/23/2005#,#6/29/2005#,"") .AddBar(.AddItem("Task B"),"Task",#6/24/2005#,#6/28/2005#,"") End With .EndUpdate() End With |
1379 |
I'm showing values from a ado recordset from sql 2005. When I try to edit a column with integers, it just skips back to the original numbers after pressing enter..., why
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",.get_CellValue(Item,2),.get_CellValue(Item,4)) End With End With End Sub ' Error event - Fired when an internal error occurs. Private Sub Exg2antt1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2antt1.Error With Exg2antt1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub Dim rs With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #8/3/1994# .set_PaneWidth(False,256) .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible End With .ColumnAutoResize = False .ContinueColumnScroll = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",1,1) End With .DataSource = rs .Items.AllowCellValueToItemBar = True .Columns.Item(2).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Columns.Item(4).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .EndUpdate() End With |
1378 |
Is it possible to reduce the non-working parts of the control
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .set_PaneWidth(False,40) .FirstVisibleDate = #6/20/2005# .HistogramVisible = True .HistogramHeight = 64 .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems .LevelCount = 2 With .Bars.Item("Task") .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation .HistogramPattern = .Pattern End With .UnitWidthNonworking = -8 .get_Level(1).FormatLabel = "weekday(dvalue) in (0,6) ? `` : value" End With With .Items h = .AddItem("Task A") .AddBar(h,"Task",#6/23/2005#,#6/29/2005#,"","4 working days bar") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,False) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,4) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) h = .AddItem("Task B") .AddBar(h,"Task",#6/28/2005#,#6/30/2005#,"","2 working days bar") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,False) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,2) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) End With .EndUpdate() End With |
1377 |
I don't want to see the "schedule"/show "workload" in non-working days part of the histogram
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .set_PaneWidth(False,40) .FirstVisibleDate = #6/20/2005# .HistogramVisible = True .HistogramHeight = 64 .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems .LevelCount = 2 With .Bars.Item("Task") .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation .HistogramPattern = .Pattern End With .ShowNonworkingDates = False .ShowNonworkingUnits = False End With With .Items h = .AddItem("Task A") .AddBar(h,"Task",#6/23/2005#,#6/29/2005#,"","4 working days bar") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,False) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,4) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) h = .AddItem("Task B") .AddBar(h,"Task",#6/28/2005#,#6/30/2005#,"","2 working days bar") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,False) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,2) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) End With .EndUpdate() End With |
1376 |
The control shows, and handles non-working days PERFECT, but how is it possible to reflect this in the Histogram. I don't want to "schedule"/show "workload" in non-working days...
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .set_PaneWidth(False,40) .FirstVisibleDate = #6/20/2005# .HistogramVisible = True .HistogramHeight = 64 .HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems .LevelCount = 2 With .Bars.Item("Task") .HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation .HistogramPattern = .Pattern End With End With With .Items h = .AddItem("Task A") .AddBar(h,"Task",#6/23/2005#,#6/29/2005#,"","4 working days bar") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,False) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,4) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) h = .AddItem("Task B") .AddBar(h,"Task",#6/28/2005#,#6/30/2005#,"","2 working days bar") .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,False) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,2) .set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) End With .EndUpdate() End With |
1375 |
When I do select the button in the overview-zoom I want the scaling to change accordingly. Can I set different scales per selected zoom level
' OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area. Private Sub Exg2antt1_OverviewZoom(ByVal sender As System.Object) Handles Exg2antt1.OverviewZoom With Exg2antt1 Debug.Print( .Chart.UnitScale ) End With End Sub With Exg2antt1 With .Chart .set_PaneWidth(False,0) .LevelCount = 2 .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .AllowOverviewZoom = exontrol.EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond,"") .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exYear,"") End With End With |
1374 |
How do I display Icons instead of text in the overview zoom area
With Exg2antt1 .Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _ "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _ "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") With .Chart .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .AllowOverviewZoom = exontrol.EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond,"") .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exYear,"") Debug.Print( .OverviewZoomCaption ) .OverviewZoomCaption = "Year|½Year|¼Year|Month|Third|<img>1</img>|Day|Hour|Min|Sec" End With End With |
1373 |
How do I get it to only display Min, Hour, Day, Week , Month, ie remove Sec and Year in the overview area
With Exg2antt1 With .Chart .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .AllowOverviewZoom = exontrol.EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond,"") .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exYear,"") End With End With |
1372 |
Is it possible to show quarter hours markers
With Exg2antt1 .BeginUpdate() .GridLineColor = Color.FromArgb(0,0,0) .VisualAppearance.Add(3,"gBFLBCJwBAEHhEJAEGg4BdMIQAAYAQGKIYBkAKBQAGaAoDDUNw5QwAAwjSKkEwsACEIrjKCRShyCYZRhGcTAFBMIhkGoSZKlCIRVDCKYJDbKACSFKkNQ7AabZBgOQJV" & _ "gOKovThKcIybQAASJCKRY7nUIIJA+SoDSRAbqhYIgASnKqLJAkACIJJAaRjHQdJxGKKMQANBghCZseKhWgkKIJUxAdLTWAAMQuaCoZ5icRAca2fJ+XzfeBYDgmAYNQbD" & _ "cJhHCMMwXDaJZBiGJ4dimI4rR7JIDzDJ8cxbEKTZ5meg5boGRZNTrMQA0fQ9MynK6vahfOi7DpuaZnWrcMb2fYNZwrGq0bxoW58BwmP5/XrkNa4XgcVgmAUBA") .HeaderHeight = 20 With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,0) .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour With .get_Level(0) .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside .Label = "<%dddd%>, <%mmmm%> <b><%d%></b>, <%yyyy%>" .DrawTickLines = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelSolidLine End With With .get_Level(1) .Label = "<%hh%>:00" .BackColor32 = &H3000000 .DrawTickLines = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelSolidLine End With .DrawLevelSeparator = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelSolidLine .UnitWidth = 64 .ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exMinute .ResizeUnitCount = 15 End With .EndUpdate() End With |
1371 |
How can I ensure or always show the labels on the chart part, when scrolling the chart to left or right
With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,0) .LevelCount = 2 .UnitWidth = 48 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour With .get_Level(0) .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside Or exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Label = "<%dddd%>, <%mmmm%> <b><%d%></b>, <%yyyy%>" End With .get_Level(1).Label = "<%hh%>:00" End With .EndUpdate() End With |
1370 |
I associate the Start and End columns with bars, but some of them are not shown. What am I doing wrong
With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .Items.AllowCellValueToItemBar = True With .Chart .LevelCount = 2 .FirstVisibleDate = #12/25/2000# .set_PaneWidth(False,128) End With With .Columns.Add("Start") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"K1") End With With .Columns.Add("End") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"K1") End With With .Items .AddBar(.AddItem(),"Task",#1/1/2001#,#1/5/2001#,"K1") .AddBar(.AddItem(),"Task",#1/2/2001#,#1/6/2001#,"K1") .AddBar(.AddItem(),"Task",#1/3/2001#,#1/7/2001#,"????","????") End With .EndUpdate() End With |
1369 |
How can I implement OLE Drag and Drop operation
// OLEStartDrag event is not supported. Use the DragEnter,DragLeave,DragOver, DragDrop ... events. With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .Columns.Add("Default") With .Items .AddItem("Item 1") .AddItem("Item 2") .AddItem("Item 3") .AddItem("Item 4") .AddItem("Item 5") End With .OLEDropMode = exontrol.EXG2ANTTLib.exOLEDropModeEnum.exOLEDropManual .EndUpdate() End With |
1368 |
I can not associate the bar's start and end properties with my start/end columns, only if the bar's key is empty or null. What can I do
' ButtonClick event - Occurs when user clicks on the cell's button. Private Sub Exg2antt1_ButtonClick(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer,ByVal Key As Object) Handles Exg2antt1.ButtonClick With Exg2antt1 .BeginUpdate() With .Columns .Item("Tasks").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"B") .Item("Start").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"B") .Item("End").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"B") End With With .Items .set_CellValue(Item,1,"B") .set_ItemBar(0,"B",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,0) .set_ItemBar(0,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16775408) End With .EndUpdate() End With End Sub Dim h With Exg2antt1 .BeginUpdate() With .Columns With .Add("Tasks") .Width = 32 .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,3) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A") End With With .Add("Start") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A") .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType End With With .Add("End") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A") .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType End With End With With .Chart .FirstVisibleDate = #9/20/2006# .AllowLinkBars = True .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .LevelCount = 2 .set_PaneWidth(False,196) With .Bars.Item("Task") .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .set_Overlaid(exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsTransparent,80) End With End With With .Items .set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,1) h = .get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,0) .set_CellValue(h,0,"Select") .set_CellHasButton(h,0,True) .set_CellMerge(h,1,2) .set_CellValue(h,1,"A") .get_CellEditor(h,1).EditType = exontrol.EXG2ANTTLib.EditTypeEnum.EditType End With With .Items .AllowCellValueToItemBar = True h = .AddItem("Task 1") .AddBar(h,"Task",#9/21/2006#,#9/24/2006#,"A","A") .AddBar(h,"Task",#9/25/2006#,#9/28/2006#,"B","B") .set_ItemBar(h,"B",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16775408) h = .AddItem("Task 2") .AddBar(h,"Task",#9/22/2006#,#9/25/2006#,"A","A") .AddBar(h,"Task",#9/26/2006#,#9/29/2006#,"B","B") .set_ItemBar(h,"B",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16775408) End With .EndUpdate() End With |
1367 |
How can I determine the order of the events
' AddLink event - Occurs when the user links two bars using the mouse. Private Sub Exg2antt1_AddLink(ByVal sender As System.Object,ByVal LinkKey As String) Handles Exg2antt1.AddLink With Exg2antt1 Debug.Print( "AddLink" ) Debug.Print( LinkKey ) End With End Sub ' AfterExpandItem event - Fired after an item is expanded (collapsed). Private Sub Exg2antt1_AfterExpandItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AfterExpandItem With Exg2antt1 Debug.Print( "AfterExpandItem" ) Debug.Print( Item ) End With End Sub ' AllowLink event - Notifies at runtime when a link between two bars is possible. Private Sub Exg2antt1_AllowLink(ByVal sender As System.Object,ByVal StartItem As Integer,ByVal StartBarKey As Object,ByVal EndItem As Integer,ByVal EndBarKey As Object,ByRef LinkKey As Object,ByRef Cancel As Boolean) Handles Exg2antt1.AllowLink With Exg2antt1 Debug.Print( "AllowLink" ) Debug.Print( StartItem ) Debug.Print( StartBarKey ) Debug.Print( EndItem ) Debug.Print( EndBarKey ) Debug.Print( LinkKey ) End With End Sub ' AnchorClick event - Occurs when an anchor element is clicked. Private Sub Exg2antt1_AnchorClick(ByVal sender As System.Object,ByVal AnchorID As String,ByVal Options As String) Handles Exg2antt1.AnchorClick With Exg2antt1 Debug.Print( "AnchorClick" ) Debug.Print( AnchorID ) Debug.Print( Options ) End With End Sub ' BarParentChange event - Occurs just before moving a bar from current item to another item. Private Sub Exg2antt1_BarParentChange(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object,ByVal NewItem As Integer,ByRef Cancel As Boolean) Handles Exg2antt1.BarParentChange With Exg2antt1 Debug.Print( "BarParentChange" ) Debug.Print( Item ) Debug.Print( Key ) Debug.Print( NewItem ) End With End Sub ' BarResize event - Occurs when a bar is moved or resized. Private Sub Exg2antt1_BarResize(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object) Handles Exg2antt1.BarResize With Exg2antt1 Debug.Print( "BarResize" ) Debug.Print( Item ) Debug.Print( Key ) End With End Sub ' BarResizing event - Occurs when a bar is moving or resizing. Private Sub Exg2antt1_BarResizing(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object) Handles Exg2antt1.BarResizing With Exg2antt1 Debug.Print( "BarResizing" ) Debug.Print( Item ) Debug.Print( Key ) End With End Sub ' BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). Private Sub Exg2antt1_BeforeExpandItem(ByVal sender As System.Object,ByVal Item As Integer,ByRef Cancel As Object) Handles Exg2antt1.BeforeExpandItem With Exg2antt1 Debug.Print( "BeforeExpandItem" ) Debug.Print( Item ) End With End Sub ' ButtonClick event - Occurs when user clicks on the cell's button. Private Sub Exg2antt1_ButtonClick(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer,ByVal Key As Object) Handles Exg2antt1.ButtonClick With Exg2antt1 Debug.Print( "ButtonClick" ) Debug.Print( Item ) Debug.Print( ColIndex ) Debug.Print( Key ) End With End Sub ' CellImageClick event - Fired after the user clicks on the image's cell area. Private Sub Exg2antt1_CellImageClick(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer) Handles Exg2antt1.CellImageClick With Exg2antt1 Debug.Print( "CellImageClick" ) Debug.Print( Item ) Debug.Print( ColIndex ) End With End Sub ' CellStateChanged event - Fired after cell's state has been changed. Private Sub Exg2antt1_CellStateChanged(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer) Handles Exg2antt1.CellStateChanged With Exg2antt1 Debug.Print( "CellStateChanged" ) Debug.Print( Item ) Debug.Print( ColIndex ) End With End Sub ' Change event - Occurs when the user changes the cell's content. Private Sub Exg2antt1_Change(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer,ByRef NewValue As Object) Handles Exg2antt1.Change With Exg2antt1 Debug.Print( "Change" ) Debug.Print( Item ) Debug.Print( ColIndex ) Debug.Print( NewValue ) End With End Sub ' ChartEndChanging event - Occurs after the chart has been changed. Private Sub Exg2antt1_ChartEndChanging(ByVal sender As System.Object,ByVal Operation As exontrol.EXG2ANTTLib.BarOperationEnum) Handles Exg2antt1.ChartEndChanging With Exg2antt1 Debug.Print( "ChartEndChanging" ) Debug.Print( Operation ) End With End Sub ' ChartSelectionChanged event - Occurs when the user selects objects in the chart area. Private Sub Exg2antt1_ChartSelectionChanged(ByVal sender As System.Object) Handles Exg2antt1.ChartSelectionChanged With Exg2antt1 Debug.Print( "ChartSelectionChanged" ) End With End Sub ' ChartStartChanging event - Occurs when the chart is about to be changed. Private Sub Exg2antt1_ChartStartChanging(ByVal sender As System.Object,ByVal Operation As exontrol.EXG2ANTTLib.BarOperationEnum) Handles Exg2antt1.ChartStartChanging With Exg2antt1 Debug.Print( "ChartStartChanging" ) Debug.Print( Operation ) End With End Sub ' Click event - Occurs when the user presses and then releases the left mouse button over the tree control. Private Sub Exg2antt1_Click(ByVal sender As System.Object) Handles Exg2antt1.Click With Exg2antt1 Debug.Print( "Click" ) End With End Sub ' ColumnClick event - Fired after the user clicks on column's header. Private Sub Exg2antt1_ColumnClick(ByVal sender As System.Object,ByVal Column As exontrol.EXG2ANTTLib.Column) Handles Exg2antt1.ColumnClick With Exg2antt1 Debug.Print( "ColumnClick" ) End With End Sub ' CreateBar event - Fired when the user creates a new bar. Private Sub Exg2antt1_CreateBar(ByVal sender As System.Object,ByVal Item As Integer,ByVal DateStart As Date,ByVal DateEnd As Date) Handles Exg2antt1.CreateBar With Exg2antt1 Debug.Print( "CreateBar" ) Debug.Print( Item ) Debug.Print( DateStart ) Debug.Print( DateEnd ) End With End Sub ' DateChange event - Occurs when the first visible date is changed. Private Sub Exg2antt1_DateChange(ByVal sender As System.Object) Handles Exg2antt1.DateChange With Exg2antt1 Debug.Print( "DateChange" ) End With End Sub ' DblClick event - Occurs when the user dblclk the left mouse button over an object. Private Sub Exg2antt1_DblClick(ByVal sender As System.Object,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.DblClick With Exg2antt1 Debug.Print( "DblClick" ) Debug.Print( Shift ) Debug.Print( X ) Debug.Print( Y ) .Edit() End With End Sub ' Edit event - Occurs just before editing the focused cell. Private Sub Exg2antt1_EditEvent(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer,ByRef Cancel As Boolean) Handles Exg2antt1.EditEvent With Exg2antt1 Debug.Print( "Edit" ) Debug.Print( Item ) Debug.Print( ColIndex ) End With End Sub ' EditClose event - Occurs when the edit operation ends. Private Sub Exg2antt1_EditCloseEvent(ByVal sender As System.Object) Handles Exg2antt1.EditCloseEvent With Exg2antt1 Debug.Print( "EditClose" ) End With End Sub ' EditOpen event - Occurs when the edit operation starts. Private Sub Exg2antt1_EditOpen(ByVal sender As System.Object) Handles Exg2antt1.EditOpen With Exg2antt1 Debug.Print( "EditOpen" ) End With End Sub ' FilterChange event - Occurs when the filter was changed. Private Sub Exg2antt1_FilterChange(ByVal sender As System.Object) Handles Exg2antt1.FilterChange With Exg2antt1 Debug.Print( "FilterChange" ) End With End Sub ' FilterChanging event - Notifies your application that the filter is about to change. Private Sub Exg2antt1_FilterChanging(ByVal sender As System.Object) Handles Exg2antt1.FilterChanging With Exg2antt1 Debug.Print( "FilterChanging" ) End With End Sub ' FocusChanged event - Occurs when a cell gets the focus. Private Sub Exg2antt1_FocusChanged(ByVal sender As System.Object) Handles Exg2antt1.FocusChanged With Exg2antt1 Debug.Print( "FocusChanged" ) End With End Sub ' InsideZoom event - Notifies your application that a date is about to be magnified. Private Sub Exg2antt1_InsideZoom(ByVal sender As System.Object,ByVal DateTime As Date) Handles Exg2antt1.InsideZoom With Exg2antt1 Debug.Print( "InsideZoom" ) Debug.Print( DateTime ) End With End Sub ' KeyDown event - Occurs when the user presses a key while an object has the focus. Private Sub Exg2antt1_KeyDown(ByVal sender As System.Object,ByRef KeyCode As Short,ByVal Shift As Short) Handles Exg2antt1.KeyDown With Exg2antt1 Debug.Print( "KeyDown" ) Debug.Print( KeyCode ) Debug.Print( Shift ) End With End Sub ' KeyPress event - Occurs when the user presses and releases an ANSI key. Private Sub Exg2antt1_KeyPress(ByVal sender As System.Object,ByRef KeyAscii As Short) Handles Exg2antt1.KeyPress With Exg2antt1 Debug.Print( "KeyPress" ) Debug.Print( KeyAscii ) End With End Sub ' KeyUp event - Occurs when the user releases a key while an object has the focus. Private Sub Exg2antt1_KeyUp(ByVal sender As System.Object,ByRef KeyCode As Short,ByVal Shift As Short) Handles Exg2antt1.KeyUp With Exg2antt1 Debug.Print( "KeyUp" ) Debug.Print( KeyCode ) Debug.Print( Shift ) End With End Sub ' LayoutChanged event - Occurs when column's position or column's size is changed. Private Sub Exg2antt1_LayoutChanged(ByVal sender As System.Object) Handles Exg2antt1.LayoutChanged With Exg2antt1 Debug.Print( "LayoutChanged" ) End With End Sub ' MouseDown event - Occurs when the user presses a mouse button. Private Sub Exg2antt1_MouseDownEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseDownEvent With Exg2antt1 Debug.Print( "MouseDown" ) Debug.Print( Button ) Debug.Print( Shift ) Debug.Print( X ) Debug.Print( Y ) End With End Sub ' MouseMove event - Occurs when the user moves the mouse. Private Sub Exg2antt1_MouseMoveEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseMoveEvent End Sub ' MouseUp event - Occurs when the user releases a mouse button. Private Sub Exg2antt1_MouseUpEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseUpEvent With Exg2antt1 Debug.Print( "MouseUp" ) Debug.Print( Button ) Debug.Print( Shift ) Debug.Print( X ) Debug.Print( Y ) End With End Sub ' OffsetChanged event - Occurs when the scroll position has been changed. Private Sub Exg2antt1_OffsetChanged(ByVal sender As System.Object,ByVal Horizontal As Boolean,ByVal NewVal As Integer) Handles Exg2antt1.OffsetChanged With Exg2antt1 Debug.Print( "OffsetChanged" ) Debug.Print( Horizontal ) Debug.Print( NewVal ) End With End Sub ' OversizeChanged event - Occurs when the right range of the scroll has been changed. Private Sub Exg2antt1_OversizeChanged(ByVal sender As System.Object,ByVal Horizontal As Boolean,ByVal NewVal As Integer) Handles Exg2antt1.OversizeChanged With Exg2antt1 Debug.Print( "OversizeChanged" ) Debug.Print( Horizontal ) Debug.Print( NewVal ) End With End Sub ' OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area. Private Sub Exg2antt1_OverviewZoom(ByVal sender As System.Object) Handles Exg2antt1.OverviewZoom With Exg2antt1 Debug.Print( "OverviewZoom" ) End With End Sub ' RClick event - Fired when right mouse button is clicked Private Sub Exg2antt1_RClick(ByVal sender As System.Object) Handles Exg2antt1.RClick With Exg2antt1 Debug.Print( "RClick" ) End With End Sub ' ScrollButtonClick event - Occurs when the user clicks a button in the scrollbar. Private Sub Exg2antt1_ScrollButtonClick(ByVal sender As System.Object,ByVal ScrollBar As exontrol.EXG2ANTTLib.ScrollBarEnum,ByVal ScrollPart As exontrol.EXG2ANTTLib.ScrollPartEnum) Handles Exg2antt1.ScrollButtonClick With Exg2antt1 Debug.Print( "ScrollButtonClick" ) Debug.Print( ScrollBar ) Debug.Print( ScrollPart ) End With End Sub ' SelectionChanged event - Fired after a new item has been selected. Private Sub Exg2antt1_SelectionChanged(ByVal sender As System.Object) Handles Exg2antt1.SelectionChanged With Exg2antt1 Debug.Print( "SelectionChanged" ) End With End Sub ' Sort event - Fired when the control sorts a column. Private Sub Exg2antt1_Sort(ByVal sender As System.Object) Handles Exg2antt1.Sort With Exg2antt1 Debug.Print( "Sort" ) End With End Sub Dim h With Exg2antt1 .BeginUpdate() .Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _ "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _ "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .GridLineStyle = exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesHDash .AutoEdit = False .ExpandOnDblClick = False With .Chart .AllowInsideZoom = True .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible .AllowOverviewZoom = exontrol.EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2001# .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .GridLineStyle = exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesVSolid Or exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesHDash .LevelCount = 2 .get_Level(0).DrawGridLines = True .Bars.Item("Task").Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond,"") .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exMinute,"") .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exHour,"") End With With .Columns With .Add("Column") .DisplayFilterButton = True .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) .Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.EditType End With With .Add("Button") .AllowSizing = False .Width = 18 .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasButton,True) End With End With With .Items h = .AddItem("parent") .set_CellImage(h,0,1) .AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"A","<a>A</a>") .set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,True) .set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip,"This is a bit of text that should be shown when cursor hovers the bar") .AddBar(h,"Task",#1/8/2001#,#1/15/2001#,"B","<a>B</a>") .set_ItemBar(h,"B",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"B",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,True) .InsertItem(h,"","child") .set_ExpandItem(h,True) End With .EndUpdate() End With |
1366 |
How can I change the chart's horizontal grid lines
Dim h With Exg2antt1 .BeginUpdate() .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .GridLineStyle = exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesHDash With .Chart .set_PaneWidth(False,48) .FirstVisibleDate = #1/1/2001# .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .GridLineStyle = exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesVSolid Or exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesHDash .LevelCount = 2 .get_Level(0).DrawGridLines = True .Bars.Item("Task").Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid End With .Columns.Add("Column") With .Items h = .AddItem("Item 1") .AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"A") .AddBar(h,"Task",#1/8/2001#,#1/15/2001#,"B") End With .EndUpdate() End With |
1365 |
Is there any way to determine whether the ADO operations fails
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",.get_CellValue(Item,2),.get_CellValue(Item,4)) End With End With End Sub ' Error event - Fired when an internal error occurs. Private Sub Exg2antt1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2antt1.Error With Exg2antt1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub Dim rs With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #8/3/1994# .set_PaneWidth(False,256) .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible End With .ColumnAutoResize = False .ContinueColumnScroll = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",1,1) End With .DataSource = rs .Items.AllowCellValueToItemBar = True .Columns.Item(2).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Columns.Item(4).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .EndUpdate() End With |
1364 |
Is it possible to select a column instead sorting it
' ColumnClick event - Fired after the user clicks on column's header. Private Sub Exg2antt1_ColumnClick(ByVal sender As System.Object,ByVal Column As exontrol.EXG2ANTTLib.Column) Handles Exg2antt1.ColumnClick ' Column.Selected = True With Exg2antt1 .BeginUpdate() .Columns.Item(0).Selected = False .Columns.Item(1).Selected = False .Items.SelectAll() .EndUpdate() End With End Sub With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .ShowFocusRect = False .SingleSel = False .FullRowSelect = exontrol.EXG2ANTTLib.CellSelectEnum.exRectSel .SortOnClick = exontrol.EXG2ANTTLib.SortOnClickEnum.exNoSort With .Columns .Add("Column1") .Add("Column2") End With With .Items .set_CellValue(.AddItem("One"),1,"Three") .set_CellValue(.AddItem("Two"),1,"Four") .SelectAll() End With .EndUpdate() End With |
1363 |
I am using the exRectSel, and clicking the first column, has no effect, instead if I click other it works as it should
With Exg2antt1 .BeginUpdate() .SearchColumnIndex = -1 .FullRowSelect = exontrol.EXG2ANTTLib.CellSelectEnum.exRectSel .ShowFocusRect = False .MarkSearchColumn = False With .Columns .Add("Column1") .Add("Column2") End With With .Items .set_CellValue(.AddItem(1),1,2) .set_CellValue(.AddItem(3),1,4) .set_CellValue(.AddItem(5),1,6) End With .EndUpdate() End With |
1362 |
Is it possible to display empty strings for 0 values
With Exg2antt1 With .Columns.Add("Currency") .FormatColumn = "dbl(value) ? currency(dbl(value)) : ``" With .Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.EditType .Numeric = exontrol.EXG2ANTTLib.NumericEnum.exFloat End With End With With .Items .AddItem(1.23) .AddItem(2.34) .AddItem(0) .AddItem(10000.99) End With End With |
1361 |
Is it possible to display empty strings for 0 values
With Exg2antt1 .Columns.Add("Number") .Columns.Add("Currency").ComputedField = "%0 ? currency(%0) : ``" With .Items .AddItem(1.23) .AddItem(2.34) .AddItem(0) .AddItem(10000.99) End With End With |
1360 |
How can I hide a date from the chart view, when I display hours instead days
With Exg2antt1 .BeginUpdate() .HeaderHeight = 32 With .Chart .FirstVisibleDate = #6/8/2011# .AdjustLevelsToBase = True .set_PaneWidth(False,0) .LevelCount = 2 .AllowInsideZoom = True With .get_Level(0) .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Label = "<b><%d%>-<%mmm%>-<%yyyy%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay End With With .get_Level(1) .Label = "<%h%>" .Count = 8 .Unit = exontrol.EXG2ANTTLib.UnitEnum.exHour .FormatLabel = "date(int(dvalue)) case (#06/08/2011# : (int(value) case ( 0 : 'Shift <b>1</b><br>23/20'; 8 : 'Shift <b>2</b><br>38/30' ; 16 : '" & _ "Shift <b>3</b><br>24/24' ) ) ; #06/09/2011# : (int(value) case ( 0 : 'Shift <b>1</b><br>15/20'; 8 : 'Shift <b>2</b><br>30/32' ; " & _ "16 : 'Shift <b>3</b><br>26/24' ) ) )" End With .UnitWidth = 64 .NonworkingDays = 0 .AllowInsideZoom = True .DefaultInsideZoomFormat.InsideUnit = exontrol.EXG2ANTTLib.UnitEnum.exMinute .AllowResizeInsideZoom = False .InsideZoomOnDblClick = False With .InsideZooms .SplitBaseLevel = False .DefaultWidth = 0 End With With .InsideZooms .Add(#6/9/2011 8:00:00 AM#) .Add(#6/9/2011 4:00:00 PM#) End With End With .EndUpdate() End With |
1359 |
I’ve created a skin (EBN) for the bars of my chart, with rounded top corners. The problem, is that these rounded corners are applied also at beginning and the end of the non working units. Is it possible to show a different picture/skin for the non-working part of the bars
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn") .VisualAppearance.Add(2,"c:\exontrol\images\pushed.ebn") .Columns.Add("Task") .Chart.set_PaneWidth(False,128) With .Chart.Bars .Item("Task").Color32 = &H1000000 .Item("Split").Color32 = &H2000000 .Add("Task:Split").Shortcut = "TS" End With .Chart.FirstVisibleDate = #1/1/2001# With .Items .AddBar(.AddItem("Task"),"TS",#1/2/2001#,#1/16/2001#) End With .EndUpdate() End With |
1358 |
How do I display the names of the tasks on bars but not in the middle of the bar (left or right)
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .FirstVisibleDate = #12/27/2000# .set_PaneWidth(False,128) With .Bars.Item("Task") .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternDot .Height = 15 End With End With With .Items h = .AddItem("Task 1") .AddBar(h,"Task",#1/3/2001#,#1/8/2001#,"K1","<b>to do</b> ") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,2) h = .AddItem("Task 2") .AddBar(h,"Task",#1/3/2001#,#1/8/2001#,"K2","<b>to do</b>") .set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) h = .AddItem("Task 3") .AddBar(h,"Task",#1/3/2001#,#1/8/2001#,"K1"," <b>to do</b>") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0) h = .AddItem("Task 4") .AddBar(h,"Task",#1/3/2001#,#1/8/2001#,"K2","<b>to do</b>") .set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,16) End With .EndUpdate() End With |
1357 |
How can I get the list of items as they are displayed
With Exg2antt1 .BeginUpdate() .BackColorAlternate = Color.FromArgb(240,240,240) .Columns.Add("Names") With .Items .AddItem("Mantel") .AddItem("Mechanik") .AddItem("Motor") .AddItem("Murks") .AddItem("Märchen") .AddItem("Möhren") .AddItem("Mühle") End With .Columns.Item(0).SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending .EndUpdate() Debug.Print( .GetItems(1) ) End With |
1356 |
How can I disable the left and right arrows to move to next cell while editing
Dim var_Editor With Exg2antt1 var_Editor = .Columns.Add("Edit").Editor With var_Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.EditType .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exLeftArrow,0) .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exRightArrow,0) End With With .Items .AddItem("Cell 1") .AddItem("Cell 2") .AddItem("Cell 3") End With End With |
1355 |
Is it possible to define a bar that is treated as a non-working hour so user can move it at runtime
Dim h With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #1/1/2001# .LevelCount = 2 .set_PaneWidth(False,48) .AllowNonworkingBars = True .Bars.Add("Task:Split").Shortcut = "Task" .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour .get_Level(1).Label = "<font ;4><%hh%>" .UnitWidth = 12 .NonworkingDaysPattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal .NonworkingDays = 0 End With .Columns.Add("Tasks") With .Items h = .AddItem("Machine") .set_ItemNonworkingUnits(h,False,"0") .AddBar(h,"",#1/1/2001 9:00:00 AM#,#1/1/2001 11:00:00 AM#,"A","pause") .set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarTreatAsNonworking,True) .AddBar(h,"Task",#1/1/2001 0:00:00 PM#,#1/1/2001 5:00:00 PM#,"Z") .set_ItemBar(h,"Z",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) End With .EndUpdate() End With |
1354 |
Is it possible to customize the chart's header so I can display shift and other values
With Exg2antt1 .BeginUpdate() .HeaderHeight = 32 With .Chart .FirstVisibleDate = #6/8/2011# .AdjustLevelsToBase = True .set_PaneWidth(False,0) .LevelCount = 2 With .get_Level(0) .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Label = "<b><%d%> - <%mmmm%> - <%yyyy%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay End With With .get_Level(1) .Label = "<%h%>" .Count = 8 .Unit = exontrol.EXG2ANTTLib.UnitEnum.exHour .FormatLabel = "date(int(dvalue)) case (#06/08/2011# : (int(value) case ( 0 : 'Shift <b>1</b><br>23/20'; 8 : 'Shift <b>2</b><br>38/30' ; 16 : '" & _ "Shift <b>3</b><br>24/24' ) ) ; #06/09/2011# : (int(value) case ( 0 : 'Shift <b>1</b><br>15/20'; 8 : 'Shift <b>2</b><br>30/32' ; " & _ "16 : 'Shift <b>3</b><br>26/24' ) ) )" End With .UnitWidth = 64 .NonworkingDays = 0 End With .EndUpdate() End With |
1353 |
How can I change both start and end dates of the bar
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Tasks") With .Chart .set_PaneWidth(False,64) .FirstVisibleDate = #6/19/2005# End With With .Items h = .AddItem("Test") .AddBar(h,"Task",#6/22/2005#,#6/27/2005#,"t1") .AddBar(h,.get_ItemBar(h,"t1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarName),#6/21/2005#,#6/22/2005#,"t1") End With .EndUpdate() End With |
1352 |
Is it possible to add new rows, as I type like in Excel
' EditClose event - Occurs when the edit operation ends. Private Sub Exg2antt1_EditCloseEvent(ByVal sender As System.Object) Handles Exg2antt1.EditCloseEvent With Exg2antt1 .Items.AddItem("") End With End Sub With Exg2antt1 .BeginUpdate() .AutoEdit = True .Columns.Add("Default").Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.EditType .FullRowSelect = exontrol.EXG2ANTTLib.CellSelectEnum.exColumnSel .Items.AddItem("") .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines .ScrollBars = exontrol.EXG2ANTTLib.ScrollBarsEnum.exDisableBoth .EndUpdate() End With |
1351 |
How do I load bars from my table/database
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 With .Items .AddBar(Item,"Task",.get_CellValue(Item,2),.get_CellValue(Item,4)) End With End With End Sub Dim rs With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #8/3/1994# .set_PaneWidth(False,256) .LevelCount = 2 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday .OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible End With .ColumnAutoResize = False .ContinueColumnScroll = False rs = New ADODB.Recordset() With rs .Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) End With .DataSource = rs .Items.AllowCellValueToItemBar = True .Columns.Item(2).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Columns.Item(4).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .EndUpdate() End With |
1350 |
Is posible to reduce the size of the picture to be shown in the bar's caption
Dim h With Exg2antt1 .BeginUpdate() .set_HTMLPicture("pic1","c:\exontrol\images\zipdisk.gif") .Columns.Add("Task") .ScrollBySingleLine = True With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,78) End With With .Items h = .AddItem("Default-Size") .set_ItemHeight(h,48) .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K1","<img>pic1</img>") h = .AddItem("Custom-Size") .AddBar(h,"Task",#1/2/2001#,#1/6/2001#,"K2","<img>pic1:18</img>") End With .EndUpdate() End With |
1349 |
Is posible to reduce the size of the picture to be shown in the column's caption
With Exg2antt1 .BeginUpdate() .set_HTMLPicture("pic1","c:\exontrol\images\zipdisk.gif") .HeaderHeight = 48 .Columns.Add("DefaultSize").HTMLCaption = "Default-Size <img>pic1</img> Picture" .Columns.Add("CustomSize").HTMLCaption = "Custom-Size <img>pic1:16</img> Picture" .EndUpdate() End With |
1348 |
Is it possible to display the selected dates using a solid color instead vertical lines
With Exg2antt1 .BeginUpdate() With .Chart .set_PaneWidth(False,128) .FirstVisibleDate = #1/1/2008# .MarkTodayColor = .BackColor .LevelCount = 2 .MarkSelectDateColor32 = &H7fcbc0ff .SelectLevel = 1 .set_SelectDate(#1/8/2008#,True) .set_SelectDate(#1/9/2008#,True) .set_SelectDate(#1/10/2008#,True) End With .DefaultItemHeight = 72 .Columns.Add("Default") With .Items .AddBar(.AddItem(""),"",#1/7/2008#,#1/12/2008#,"","<b>MarkSelectDateColor(32)</b><br>should be <font ;11><i>0x7F000000 + RGB(rr,gg,bb)</i></font><br> or in the format as: <font ;" & _ "11><i>0x7FBBGGRR</i></font>, <br>where BB is the hexa value for Blue, <br>GG for grean and so on.") End With .EndUpdate() End With |
1347 |
How can I show the cells using a different background color based on the condition I have
With Exg2antt1 .BeginUpdate() .SelBackMode = exontrol.EXG2ANTTLib.BackModeEnum.exTransparent .ShowFocusRect = False With .ConditionalFormats With .Add("dbl(%1)-dbl(%0) = 1") .BackColor = Color.FromArgb(255,0,0) .ApplyTo = &H1 End With With .Add("dbl(%0)-dbl(%1) = 3") .BackColor = Color.FromArgb(255,255,0) .ApplyTo = exontrol.EXG2ANTTLib.FormatApplyToEnum.exFormatToColumns End With With .Add("dbl(%1)-dbl(%0) = 4") .ForeColor = Color.FromArgb(128,128,128) .Bold = True .ApplyTo = exontrol.EXG2ANTTLib.FormatApplyToEnum.exFormatToItems End With End With With .Columns .Add("C1").Width = 8 .Add("C2").Width = 8 .Add("") End With .Chart.set_PaneWidth(True,0) With .Items .set_CellValue(.AddItem(2),1,3) .set_CellValue(.AddItem(5),1,2) .set_CellValue(.AddItem(5),1,6) .set_CellValue(.AddItem(2),1,6) End With .EndUpdate() End With |
1346 |
How can I specify the frame's color for all Task bars
With Exg2antt1 .BeginUpdate() .Columns.Add("Task") With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,128) .Bars.Item("Task").set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255) End With With .Items .AddBar(.AddItem("Task 1"),"Task",#1/2/2001#,#1/5/2001#,"K1") .AddBar(.AddItem("Task 2"),"Task",#1/2/2001#,#1/5/2001#,"K2") .AddBar(.AddItem("Task 3"),"Task",#1/2/2001#,#1/5/2001#,"K3") End With .EndUpdate() End With |
1345 |
Is it possible to change the bar's frame color
Dim h With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 25 .Columns.Add("Task") With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,128) .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines .NonworkingDays = 0 .Bars.Item("Task").Height = 15 End With With .Items h = .AddItem("Default") .AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"K1") h = .AddItem("Red-Frame") .AddBar(h,"Task",#1/3/2001#,#1/6/2001#,"K1") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255) h = .AddItem("Green-ThickFrame") .AddBar(h,"Task",#1/4/2001#,#1/7/2001#,"K1") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern,4099) .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,32768) h = .AddItem("Red-ThickFrame/Shadow") .AddBar(h,"Task",#1/5/2001#,#1/8/2001#,"K1") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern,12291) .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255) End With .EndUpdate() End With |
1344 |
I need to customize the labels on the chart. Is it possible
With Exg2antt1 .BeginUpdate() .HeaderHeight = 32 With .Chart .FirstVisibleDate = #7/1/2011# .AdjustLevelsToBase = True .set_PaneWidth(False,0) .LevelCount = 2 With .get_Level(0) .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Label = "<b><%d%> - <%mmmm%> - <%yyyy%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay End With With .get_Level(1) .Label = "<%h%>" .Count = 8 .Unit = exontrol.EXG2ANTTLib.UnitEnum.exHour .FormatLabel = "int(value) case ( 0 : 'Shift <b>1</b><br><font ;11>' + yearday(dvalue) + '</font>/365 ' ; 8 : 'Shift <b>2</b><br>' + weekday(dv" & _ "alue) + '/20'; 16 : 'Shift <b>3</b><br>' + (weekday(dvalue) case ( 0 : '12/22'; 1 : '12/23'; 2 : '2/3'; 3 : '12/13'; 4 : '22/34'" & _ " ; 5 : '102-<fgcolor=FF0000><b>31</b></bgcolor>'; 6 : '1/1' ) ) ) " End With .UnitWidth = 64 .NonworkingDays = 0 End With .EndUpdate() End With |
1343 |
Is it possible to show a frame around the bar
Dim h With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 25 With .VisualAppearance .Add(1,"gBFLBCJwBAEHhEJAEGg4BOUMQAAYAQGKIYBkAKBQAGaAoDDYMgzQwAAxDELMEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIyAJIcaw0GSEZwgOQZB" & _ "iOEYnDANkIYJDSIYHTZIUzTJAdGSVJKNKAoKCaEgORo5SpNUghBDYKQTJyeagkaaRVCWLplRCNIwWNJdVwjEaQaaiarKNqKNpSViAEqSdKEZRLOyRZyiKQMEreY4EUDQ" & _ "cxUPYMNYaAC6AAparpbwCFpSYpRND3TaEE4jSLKAA0HD6QqebIDDJaFq6PbVXSTOLPNhgPQcWxeVJBXjLExUALGSYLC6nKayHZcHACKK5VbVW6ZZDdNy/BLQeD4QANG4" & _ "riuNJriMV4dgWVgHh+ZpgCeEIQEQJIgGkMYdA6JwjC0VAAmaJgQgmPp4lCWgSCiaB+DKIYIjqQpllMf6JgYAoAmASAWAaAZggQDJ/gKYJIDYDoDmECBGAOBBhEgVgUgS" & _ "YRoGYGYGCGKB2BCBwhmiBgLggIgoHoJIJGGKIeCiBYiiiLgXgCIpohoMIMGKGJODSCwghiZg6g6Y5InYPh/lAECAg") .Add(2,"CP:1 2 2 -2 -2") .Add(3,"CP:1 -5 -5 5 5") .Add(4,"XP:Window 19 1") .Add(5,"XP:TreeView 2 1") End With .Columns.Add("Task") With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,128) .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exHLines End With With .Items h = .AddItem("Default") .AddBar(h,"Task",#1/2/2001#,#1/5/2001#,"K1") h = .AddItem("Red-Frame") .AddBar(h,"Task",#1/3/2001#,#1/6/2001#,"K1") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255) h = .AddItem("Green-ThickFrame") .AddBar(h,"Task",#1/4/2001#,#1/7/2001#,"K1") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern,4099) .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,32768) h = .AddItem("Red-ThickFrame/Shadow") .AddBar(h,"Task",#1/4/2001#,#1/7/2001#,"K1") .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern,12291) .set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255) h = .AddItem("EBN-Frame-Border") .AddBar(h,"Task",#1/5/2001#,#1/9/2001#,"K2") .set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,16777216) h = .AddItem("EBN-Inside Frame") .AddBar(h,"Task",#1/9/2001#,#1/13/2001#,"K3") .set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432) h = .AddItem("EBN-Outside Frame") .AddBar(h,"Task",#1/15/2001#,#1/18/2001#,"K4") .set_ItemBar(h,"K4",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,50331648) h = .AddItem("EBN-XP Close Button") .AddBar(h,"Task",#1/15/2001#,#1/18/2001#,"K5") .set_ItemBar(h,"K5",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,67108864) h = .AddItem("EBN-XP TreeView Glyph") .AddBar(h,"Task",#1/15/2001#,#1/18/2001#,"K6") .set_ItemBar(h,"K6",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,83886080) End With .EndUpdate() End With |
1342 |
Currently your control, provides customization up to Year,Month,Day,Hours,etc. I would like to add Shifts in a day. Shortly, I need to customize the chart's header. Is it possible
With Exg2antt1 .BeginUpdate() With .Chart .FirstVisibleDate = #7/1/2011# .AdjustLevelsToBase = True .set_PaneWidth(False,0) .LevelCount = 2 With .get_Level(0) .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .Label = "<b><%d%> - <%mmmm%> - <%yyyy%>" .Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay End With With .get_Level(1) .Label = "<%h%>" .Count = 8 .Unit = exontrol.EXG2ANTTLib.UnitEnum.exHour .set_ReplaceLabel(0," Shift 1") .set_ReplaceLabel(8," Shift 2") .set_ReplaceLabel(16," Shift 3") End With .UnitWidth = 48 .NonworkingDays = 0 End With .EndUpdate() End With |
1341 |
The exbartootip shows dates after you moved or resized the bar. My question is during the move or resizing of bar(you click on bar and drag it,during that time) , can we display the new dates simultaneously so we will know where we want to move or resize the bar to
Dim h With Exg2antt1 .Columns.Add("Task") With .Chart .set_PaneWidth(False,64) .FirstVisibleDate = #1/1/2001# .DrawDateTicker = True .DateTickerLabel = "<%mmm%> <%d%><br><b><%yyyy%>" End With With .Items h = .AddItem("Tasks A") .AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"K1") .AddBar(h,"Task",#1/5/2001#,#1/9/2001#,"K2") .set_SelectableItem(.AddItem(),False) h = .AddItem("Tasks B") .AddBar(h,"Task",#1/3/2001#,#1/5/2001#,"K1") .AddBar(h,"Task",#1/8/2001#,#1/11/2001#,"K2") End With End With |
1340 |
Is it possible to assign a tooltip automatically to all bars, so it can display the start and end, without specifying the IexBarToolTip for each bar
Dim h With Exg2antt1 .Columns.Add("Task") With .Chart .set_PaneWidth(False,64) .FirstVisibleDate = #1/1/2001# .Bars.Item("Task").set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip,"<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>") End With With .Items h = .AddItem("Tasks A") .AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"K1") .AddBar(h,"Task",#1/5/2001#,#1/9/2001#,"K2") h = .AddItem("Tasks B") .AddBar(h,"Task",#1/3/2001#,#1/5/2001#,"K1") .AddBar(h,"Task",#1/8/2001#,#1/11/2001#,"K2") End With End With |
1339 |
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column
With Exg2antt1 .BeginUpdate() With .ConditionalFormats.Add("1") .Bold = True .ForeColor = Color.FromArgb(255,0,0) .ApplyTo = &H1 End With .Columns.Add("C1") With .Columns.Add("C2") .HeaderBold = True .HTMLCaption = "<fgcolor=FF0000>C2" End With With .Items .set_CellValue(.AddItem(10),1,11) .set_CellValue(.AddItem(12),1,13) End With .EndUpdate() End With |
1338 |
How can I remove a date-time zone
' Click event - Occurs when the user presses and then releases the left mouse button over the tree control. Private Sub Exg2antt1_Click(ByVal sender As System.Object) Handles Exg2antt1.Click With Exg2antt1 .Chart.RemoveTimeZone("Z1") End With End Sub With Exg2antt1 With .Chart .set_PaneWidth(False,18) .LevelCount = 2 .FirstVisibleDate = #1/1/2010# .MarkTimeZone("Z1",#1/4/2010#,#1/8/2010#,16744544) End With End With |
1337 |
How can I filter the check-boxes (method 2)
With Exg2antt1 With .Columns.Add("Check") With .Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckValueType .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exCheckValue2,1) End With .DisplayFilterButton = True .DisplayFilterPattern = False .CustomFilter = "checked||-1|||unchecked||0" End With With .Items .AddItem(True) .AddItem(True) .AddItem(False) .AddItem(True) .AddItem(False) .AddItem(True) .AddItem(False) End With End With |
1336 |
How can I filter the check-boxes (method 1)
With Exg2antt1 With .Columns.Add("Check") With .Editor .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckValueType .set_Option(exontrol.EXG2ANTTLib.EditorOptionEnum.exCheckValue2,1) End With .DisplayFilterButton = True .DisplayFilterPattern = False .FilterType = exontrol.EXG2ANTTLib.FilterTypeEnum.exCheck End With With .Items .AddItem(True) .AddItem(True) .AddItem(False) .AddItem(True) .AddItem(False) .AddItem(True) .AddItem(False) End With End With |
1335 |
How can add a button to control
' ButtonClick event - Occurs when user clicks on the cell's button. Private Sub Exg2antt1_ButtonClick(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer,ByVal Key As Object) Handles Exg2antt1.ButtonClick With Exg2antt1 Debug.Print( "ButtonClick" ) Debug.Print( .Items.get_CellCaption(Item,ColIndex) ) Debug.Print( Key ) End With End Sub Dim h,s With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 22 .HeaderHeight = 22 .Appearance = exontrol.EXG2ANTTLib.AppearanceEnum.None2 .DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines .ScrollBySingleLine = False .Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _ "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _ "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") .set_HTMLPicture("pic1","c:\exontrol\images\auction.gif") .Chart.set_PaneWidth(True,0) With .Columns With .Add("Type") .Width = 48 .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) End With With .Add("Appearance") .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment .HeaderAlignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment End With End With With .Items h = .AddItem("Items.<b>CellHasButton</b> property") .set_CellValue(h,1,"Button <b>1</b>") .set_CellHasButton(h,1,True) h = .AddItem("Items.<b>CellButtonAutoWidth</b> property") .set_CellValue(h,1," Button <b>2</b> ") .set_CellHasButton(h,1,True) .set_CellButtonAutoWidth(h,1,True) h = .AddItem("Items.<b>CellHasButton</b> property") .set_CellValue(h,1," <img>2</img>Button <b>3</b> ") .set_CellHasButton(h,1,True) .set_CellButtonAutoWidth(h,1,True) h = .AddItem("Items.<b>CellHasButton</b> property") .set_ItemHeight(h,32) .set_CellValue(h,1," <img>2</img>Button <b>4</b> <img>pic1</img> ") .set_CellHasButton(h,1,True) .set_CellButtonAutoWidth(h,1,True) h = .AddItem("Items.<b>CellHasButton</b> in splitted cells") .set_CellValue(h,1," Button <b>5.1</b> ") .set_CellHasButton(h,1,True) .set_CellButtonAutoWidth(h,1,True) s = .get_SplitCell(h,1) .set_CellValue(0,s," Button <b>5.2</b> ") .set_CellHasButton(0,s,True) .set_CellButtonAutoWidth(0,s,True) h = .AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>") .set_CellValue(h,1,"Visible when clicking the cell") With .get_CellEditor(h,1) .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.EditType .AddButton("B1",1,0,"This is a bit of text that's shown when the cursor hovers the button B1") .AddButton("B3",2,1,"This is a bit of text that's shown when the cursor hovers the button B3") .AddButton("B4",1,1,"This is a bit of text that's shown when the cursor hovers the button B4") .ButtonWidth = 24 End With h = .AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>") .set_CellValue(h,1,3) With .get_CellEditor(h,1) .EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckListType .AddItem(1,"Flag 1") .AddItem(2,"Flag 2") .AddItem(4,"Flag 4") .AddItem(8,"Flag 8") .AddButton("C1",1,0,"This is a bit of text that's shown when the cursor hovers the button C1") .AddButton("C3",2,0,"This is a bit of text that's shown when the cursor hovers the button C2") .AddButton("C4",1,0,"This is a bit of text that's shown when the cursor hovers the button C3") .ButtonWidth = 24 End With End With .EndUpdate() End With |
1334 |
Is it posible to store additional values against each item, cell, bar, link, such as custom values such string / numbers etc
Dim h With Exg2antt1 With .Chart .LevelCount = 2 .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,96) End With .Columns.Add("Column").Data = "Extra_Data_Column" With .Items h = .AddItem("Item 1") .set_ItemData(h,"Extra_Data_Item 1") .set_CellData(h,0,"Extra_Data_Item 1_Cell_0") .AddBar(h,"Task",#1/2/2001#,#1/4/2001#,"B1") .set_ItemBar(h,"B1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarData,"Extra_B1_Data") h = .AddItem("Item 2") .set_ItemData(h,"Extra_Data_Item 2") .AddBar(h,"Task",#1/6/2001#,#1/10/2001#,"B2") .set_ItemBar(h,"B2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarData,"Extra_B2_Data") .AddLink("L1",.get_FindItem("Item 1",0),"B1",.get_FindItem("Item 2",0),"B2") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkUserData,"Extra_Link_Data") End With End With |
1333 |
How do I set the parent item to show the total number of days for its children and also the minimum and maximum dates for its children
Dim h,h1,h2,h3 With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .Indent = 11 .HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exSolidLine .Items.AllowCellValueToItemBar = True With .Columns .Add("Tasks") .Add("Start").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1) .Add("End").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2) .Add("Duration").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,513) End With With .Chart .ShowNonworkingDates = False .FirstVisibleDate = #9/20/2006# .AllowLinkBars = False .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .LevelCount = 2 .set_PaneWidth(False,220) End With With .Items h = .AddItem("Project") .AddBar(h,"Summary",#9/21/2006#,#10/3/2006#) h1 = .InsertItem(h,Nothing,"Task 1") .AddBar(h1,"Task",#9/21/2006#,#9/24/2006#) h2 = .InsertItem(h,Nothing,"Task 2") .AddBar(h2,"Task",#9/24/2006#,#9/28/2006#) h3 = .InsertItem(h,Nothing,"Task 3") .AddBar(h3,"Task",#9/28/2006#,#10/3/2006#) .DefineSummaryBars(h,"",h1,"") .DefineSummaryBars(h,"",h2,"") .DefineSummaryBars(h,"",h3,"") .set_ExpandItem(h,True) .set_ItemBold(h,True) End With .EndUpdate() End With |
1332 |
Is it possible to specify the distance between 2 bars to be at least 2 working days
' BarResizing event - Occurs when a bar is moving or resizing. Private Sub Exg2antt1_BarResizing(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object) Handles Exg2antt1.BarResizing With Exg2antt1 .Items.SchedulePDM(Item,Key) End With End Sub Dim h1,h2,h3 With Exg2antt1 .BeginUpdate() .DefaultItemHeight = 24 .AntiAliasing = True .Columns.Add("Task") With .Chart .LevelCount = 2 With .Bars.Add("Task:Split") .Shortcut = "Task" .Color = Color.FromArgb(0,0,0) .Height = 17 .Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternFrameShadow End With .FirstVisibleDate = #1/3/2001# .set_PaneWidth(False,48) .LinksWidth = 2 .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .AllowLinkBars = False .FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday .NonworkingDaysPattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal End With With .Items h1 = .AddItem("Task 1") .AddBar(h1,"Task",#1/4/2001#,#1/6/2001#,"K1") .set_ItemBar(h1,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) h2 = .AddItem("Task 2") .AddBar(h2,"Task",#1/2/2001#,#1/5/2001#,"K2") .set_ItemBar(h2,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) .AddLink("L1",h1,"K1",h2,"K2") .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,-1) .set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkColor,8421504) h3 = .AddItem("Task 3") .AddBar(h3,"Task",#1/2/2001#,#1/6/2001#,"K3") .set_ItemBar(h3,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,True) .AddLink("L2",h2,"K2",h3,"K3") .set_Link("L2",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkText,"<br><br><br><br>This link <u>delays</u> the bars<br>with <b>2</b> working days") .set_Link("L2",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkPDMWorkingDelay,2) .set_Link("L2",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,-1) .SchedulePDM(0,"K1") End With .EndUpdate() End With |
1331 |
The item is not getting selected when clicking the cell's checkbox. What should I do
' CellStateChanged event - Fired after cell's state has been changed. Private Sub Exg2antt1_CellStateChanged(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer) Handles Exg2antt1.CellStateChanged With Exg2antt1 .Items.set_SelectItem(Item,True) End With End Sub With Exg2antt1 .Columns.Add("Check").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,True) With .Items .AddItem(0) .AddItem(1) .AddItem(2) .AddItem(3) End With End With |
1330 |
How can I add a summary item as a child or subitem of another one
Dim hChild,hSummary With Exg2antt1 .BeginUpdate() With .Chart .set_PaneWidth(False,96) .FirstVisibleDate = #1/1/2011# .LevelCount = 2 End With .Columns.Add("Default") .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Items hSummary = .AddItem("Project") .AddBar(hSummary,"Summary",#1/1/2011#,#1/1/2011#,"Sum") hChild = .InsertItem(hSummary,0,"Task 1") .AddBar(hChild,"Task",#1/2/2011#,#1/4/2011#,"Task1") .DefineSummaryBars(hSummary,"Sum",hChild,"Task1") hChild = .InsertItem(hSummary,0,"Task 2") .AddBar(hChild,"Task",#1/4/2011#,#1/6/2011#,"Task2") .DefineSummaryBars(hSummary,"Sum",hChild,"Task2") hChild = .InsertItem(hSummary,0,"Task 3") .AddBar(hChild,"Task",#1/6/2011#,#1/8/2011#,"Task3") .DefineSummaryBars(hSummary,"Sum",hChild,"Task3") .set_ExpandItem(hSummary,True) End With .EndUpdate() End With |
1329 |
How can I make an item a subitem of another one
Dim hChild,hSummary With Exg2antt1 .BeginUpdate() .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .Chart.set_PaneWidth(True,0) .Columns.Add("Default") With .Items hSummary = .AddItem("Project") hChild = .InsertItem(hSummary,0,"Task 1") hChild = .InsertItem(hSummary,0,"Task 2") hChild = .InsertItem(hSummary,0,"Task 3") .set_ExpandItem(hSummary,True) End With .EndUpdate() End With |
1328 |
Is it possible to move a bar per drag and drop to another owner/item
Dim h With Exg2antt1 .BeginUpdate() .Columns.Add("Members").set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) With .Chart .FirstVisibleDate = #9/20/2006# .AllowLinkBars = False .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .AllowSelectObjects = exontrol.EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects .LevelCount = 2 .set_PaneWidth(False,96) .Bars.Item("Task").OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack End With With .Items h = .AddItem("Member <b>1</b>") .AddBar(h,"Task",#9/21/2006#,#9/23/2006#,"T102","Task <b>102</b>") .set_ItemBar(h,"T102",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"T102",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,True) h = .AddItem("Member <b>2</b>") h = .AddItem("Member <b>3</b>") h = .AddItem("Member <b>4</b>") .AddBar(h,"Task",#9/21/2006#,#9/23/2006#,"T103","Task <b>103</b>") .set_ItemBar(h,"T103",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18) .set_ItemBar(h,"T103",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,True) End With .EndUpdate() End With |
1327 |
I have the chart displaying days, is it possible to display bars/tasks up to hours so inside days somehow
With Exg2antt1 .BeginUpdate() With .Chart .LevelCount = 2 .UnitWidth = 38 .set_PaneWidth(False,28) .FirstVisibleDate = #3/4/2011# .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour End With .Columns.Add("Default") With .Items .AddBar(.AddItem("ASS"),"Task",#3/7/2011#,#3/7/2011 3:30:00 AM#) .AddBar(.AddItem("EMB"),"Task",#3/7/2011 3:30:00 AM#,#3/8/2011 9:15:00 AM#) .AddBar(.AddItem("TES"),"Task",#3/8/2011 9:15:00 AM#,#3/8/2011 1:45:00 PM#) End With .EndUpdate() End With |
1326 |
Is it possible to limit the height of the item while resizing
' AddItem event - Occurs after a new Item has been inserted to Items collection. Private Sub Exg2antt1_AddItem(ByVal sender As System.Object,ByVal Item As Integer) Handles Exg2antt1.AddItem With Exg2antt1 .Items.set_ItemMinHeight(Item,18) .Items.set_ItemMaxHeight(Item,72) End With End Sub With Exg2antt1 .BeginUpdate() .ItemsAllowSizing = exontrol.EXG2ANTTLib.ItemsAllowSizingEnum.exResizeItem .ScrollBySingleLine = False .BackColorAlternate = Color.FromArgb(240,240,240) .Columns.Add("Names") With .Items .AddItem("Mantel") .AddItem("Mechanik") .AddItem("Motor") .AddItem("Murks") .AddItem("Märchen") .AddItem("Möhren") .AddItem("Mühle") End With .Columns.Item(0).SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending .EndUpdate() End With |
1325 |
Is it possible to copy the hierarchy of the control using the GetItems method
Dim h With Exg2antt1 .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .Columns.Add("Def") With .Items h = .AddItem("Root") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") End With .PutItems(.GetItems(-1)) End With |
1324 |
I have found a property ReadOnly but this doesn't work correctly. I need the chart part of the control to be readonly too. Is it possible
With Exg2antt1 .ReadOnly = exontrol.EXG2ANTTLib.ReadOnlyEnum.exReadOnly With .Chart .AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar .BarsAllowSizing = False .AllowLinkBars = False End With End With |
1323 |
How can I select a column
' MouseDown event - Occurs when the user presses a mouse button. Private Sub Exg2antt1_MouseDownEvent(ByVal sender As System.Object,ByVal Button As Short,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Exg2antt1.MouseDownEvent With Exg2antt1 .BeginUpdate() .Columns.Item(Exg2antt1.get_ColumnFromPoint(X,Y)).Selected = True .Items.SelectAll() .EndUpdate() End With End Sub With Exg2antt1 .BeginUpdate() .MarkSearchColumn = False .SingleSel = False .FullRowSelect = exontrol.EXG2ANTTLib.CellSelectEnum.exRectSel .SortOnClick = exontrol.EXG2ANTTLib.SortOnClickEnum.exNoSort With .Columns .Add("Column1") .Add("Column2") End With With .Items .set_CellValue(.AddItem("One"),1,"One") .set_CellValue(.AddItem("Two"),1,"Two") End With .EndUpdate() End With |
1322 |
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("Item") .DisplayFilterButton = True .DisplayFilterPattern = False .Filter = "Child 1" .FilterType = exontrol.EXG2ANTTLib.FilterTypeEnum.exFilter End With With .Columns.Add("Date") .DisplayFilterButton = True .DisplayFilterPattern = False .DisplayFilterDate = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowExclude Or exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox Or exontrol.EXG2ANTTLib.FilterListEnum.exNoItems .Filter = #12/28/2010# .FilterType = exontrol.EXG2ANTTLib.FilterTypeEnum.exDate End With .FilterCriteria = "%0 or %1" .set_Description(exontrol.EXG2ANTTLib.DescriptionTypeEnum.exFilterBarOr,"<font ;18><fgcolor=FF0000>or</fgcolor></font>") .set_Description(exontrol.EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,"<font ;18><fgcolor=FF0000>and</fgcolor></font>") With .Items h = .AddItem("Root 1") .set_CellValue(.InsertItem(h,Nothing,"Child 1"),1,#12/27/2010#) .set_CellValue(.InsertItem(h,Nothing,"Child 2"),1,#12/28/2010#) .set_ExpandItem(h,True) h = .AddItem("Root 2") .set_CellValue(.InsertItem(h,Nothing,"Child 1"),1,#12/29/2010#) .set_CellValue(.InsertItem(h,Nothing,"Child 2"),1,#12/30/2010#) End With .ApplyFilter() .EndUpdate() End With |
1321 |
Is it possible exclude the dates being selected in the drop down filter window
With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) With .Columns.Add("Date") .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortDate .DisplayFilterButton = True .DisplayFilterPattern = False .DisplayFilterDate = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowExclude Or exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox Or exontrol.EXG2ANTTLib.FilterListEnum.exNoItems End With With .Items .AddItem(#12/27/2010#) .AddItem(#12/28/2010#) .AddItem(#12/29/2010#) .AddItem(#12/30/2010#) .AddItem(#12/31/2010#) End With .EndUpdate() End With |
1320 |
How can I display a calendar control inside the drop down filter window
With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) With .Columns.Add("Date") .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortDate .DisplayFilterButton = True .DisplayFilterPattern = False .DisplayFilterDate = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox Or exontrol.EXG2ANTTLib.FilterListEnum.exNoItems End With With .Items .AddItem(#12/27/2010#) .AddItem(#12/28/2010#) .AddItem(#12/29/2010#) .AddItem(#12/30/2010#) .AddItem(#12/31/2010#) End With .EndUpdate() End With |
1319 |
Is it possible to include the dates as checkb-boxes in the drop down filter window
With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) With .Columns.Add("Dates") .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortDate .DisplayFilterButton = True .DisplayFilterPattern = True .DisplayFilterDate = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox .Filter = "to 12/27/2010" .FilterType = exontrol.EXG2ANTTLib.FilterTypeEnum.exDate End With With .Items .AddItem(#12/27/2010#) .AddItem(#12/28/2010#) .AddItem(#12/29/2010#) .AddItem(#12/30/2010#) .AddItem(#12/31/2010#) End With .ApplyFilter() .EndUpdate() End With |
1318 |
How can I filter items for dates before a specified date
With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) With .Columns.Add("Dates") .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortDate .DisplayFilterButton = True .DisplayFilterPattern = True .DisplayFilterDate = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exNoItems .Filter = "to 12/27/2010" .FilterType = exontrol.EXG2ANTTLib.FilterTypeEnum.exDate End With With .Items .AddItem(#12/27/2010#) .AddItem(#12/28/2010#) .AddItem(#12/29/2010#) .AddItem(#12/30/2010#) .AddItem(#12/31/2010#) End With .ApplyFilter() .EndUpdate() End With |
1317 |
Is it possible to filter dates
With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) With .Columns.Add("Dates") .SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortDate .DisplayFilterButton = True .DisplayFilterPattern = True .DisplayFilterDate = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exNoItems End With With .Items .AddItem(#12/27/2010#) .AddItem(#12/28/2010#) .AddItem(#12/29/2010#) .AddItem(#12/30/2010#) .AddItem(#12/31/2010#) End With .EndUpdate() End With |
1316 |
Is it possible to change the Exclude field name to something different, in the drop down filter window
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .set_Description(exontrol.EXG2ANTTLib.DescriptionTypeEnum.exFilterBarExclude,"Leaving out") With .Columns.Add("Items") .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowExclude Or exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") End With .EndUpdate() End With |
1315 |
How can I display the Exclude field in the drop down filter window
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("Items") .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowExclude Or exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") End With .EndUpdate() End With |
1314 |
Is it possible to show and ensure the focused item from the control, in the drop down filter window
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("Items") .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowFocusItem Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .set_SelectItem(.InsertItem(h,Nothing,"Child 2"),True) .set_ExpandItem(h,True) End With .EndUpdate() End With |
1313 |
Is it possible to show only blanks items with no listed items from the control
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("Items") .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowBlanks Or exontrol.EXG2ANTTLib.FilterListEnum.exNoItems End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") End With .EndUpdate() End With |
1312 |
How can I include the blanks items in the drop down filter window
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("Items") .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowBlanks Or exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") End With .EndUpdate() End With |
1311 |
How can I select multiple items in the drop down filter window, using check-boxes
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("Items") .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") End With .EndUpdate() End With |
1310 |
Is it possible to allow a single item being selected in the drop down filter window
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("Items") .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exSingleSel End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") End With .EndUpdate() End With |
1309 |
How can I display no (All) item in the drop down filter window
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .set_Description(exontrol.EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAll,"") With .Columns.Add("Items") .DisplayFilterButton = True .DisplayFilterPattern = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exNoItems End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") End With .EndUpdate() End With |
1308 |
Is it possible to display no items in the drop down filter window, so only the pattern is visible
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("Items") .DisplayFilterButton = True .DisplayFilterPattern = True .FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exNoItems End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") End With .EndUpdate() End With |
1307 |
How can I specify the time-scale available when zoom-in/zoom-out or enlarging the chart
With Exg2antt1 .BeginUpdate() .Columns.Add("Task") With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .ShowNonworkingDates = False .LevelCount = 3 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .AllowResizeChart = exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale Or exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle Or exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exHour,"") .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exMinute,"") .set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond,"") End With With .Items .AddBar(.AddItem("Task A"),"Task",#1/2/2001#,#1/6/2001#,"K1") .AddBar(.AddItem("Task B"),"Task",#1/6/2001#,#1/10/2001#,"K1") .AddBar(.AddItem("Task C"),"Task",#1/10/2001#,#1/14/2001#,"K1") .AddBar(.AddItem(""),"",#1/8/2001#,#1/8/2001#,"Info","Click the <b>middle</b> mouse button and start dragging") End With .EndUpdate() End With |
1306 |
How can I enable zoom-in/zoom-out or enlarging the chart, using the mouse middle button
With Exg2antt1 .BeginUpdate() .Columns.Add("Task") With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .ShowNonworkingDates = False .LevelCount = 3 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .AllowResizeChart = exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale Or exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle Or exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader End With With .Items .AddBar(.AddItem("Task A"),"Task",#1/2/2001#,#1/6/2001#,"K1") .AddBar(.AddItem("Task B"),"Task",#1/6/2001#,#1/10/2001#,"K1") .AddBar(.AddItem("Task C"),"Task",#1/10/2001#,#1/14/2001#,"K1") .AddBar(.AddItem(""),"",#1/8/2001#,#1/8/2001#,"Info","Click the <b>middle</b> mouse button and start dragging") End With .EndUpdate() End With |
1305 |
How can I enable zoom-in/zoom-out or enlarging, using the chart's header
With Exg2antt1 .BeginUpdate() .Columns.Add("Task") With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .ShowNonworkingDates = False .LevelCount = 3 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .AllowResizeChart = exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale Or exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader End With With .Items .AddBar(.AddItem("Task A"),"Task",#1/2/2001#,#1/6/2001#,"K1") .AddBar(.AddItem("Task B"),"Task",#1/6/2001#,#1/10/2001#,"K1") .AddBar(.AddItem("Task C"),"Task",#1/10/2001#,#1/14/2001#,"K1") End With .EndUpdate() End With |
1304 |
How can I enable resizing the chart, using the mouse middle button
With Exg2antt1 .BeginUpdate() .Columns.Add("Task") With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .ShowNonworkingDates = False .LevelCount = 3 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .AllowResizeChart = exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle Or exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader .MaxUnitWidth = 128 .MinUnitWidth = 8 End With With .Items .AddBar(.AddItem("Task A"),"Task",#1/2/2001#,#1/6/2001#,"K1") .AddBar(.AddItem("Task B"),"Task",#1/6/2001#,#1/10/2001#,"K1") .AddBar(.AddItem("Task C"),"Task",#1/10/2001#,#1/14/2001#,"K1") .AddBar(.AddItem(""),"",#1/8/2001#,#1/8/2001#,"Info","Click the <b>middle</b> mouse button and start dragging") End With .EndUpdate() End With |
1303 |
How can I enable resizing the chart, using the chart's header
With Exg2antt1 .BeginUpdate() .Columns.Add("Task") With .Chart .FirstVisibleDate = #1/1/2001# .set_PaneWidth(False,48) .ShowNonworkingDates = False .LevelCount = 3 .UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay .AllowResizeChart = exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader .MaxUnitWidth = 128 .MinUnitWidth = 8 End With With .Items .AddBar(.AddItem("Task A"),"Task",#1/2/2001#,#1/6/2001#,"K1") .AddBar(.AddItem("Task B"),"Task",#1/6/2001#,#1/10/2001#,"K1") .AddBar(.AddItem("Task C"),"Task",#1/10/2001#,#1/14/2001#,"K1") End With .EndUpdate() End With |
1302 |
Is it possible to auto-numbering the children items but still keeps the position after filtering
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot With .Columns.Add("Items") .DisplayFilterButton = True .FilterType = exontrol.EXG2ANTTLib.FilterTypeEnum.exFilter .Filter = "Child 2" End With With .Columns.Add("Pos.1") .FormatColumn = "1 ropos ''" .Position = 0 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.2") .FormatColumn = "1 ropos ':'" .Position = 1 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.3") .FormatColumn = "1 ropos ':|A-Z'" .Position = 2 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.4") .FormatColumn = "1 ropos '|A-Z|'" .Position = 3 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.5") .FormatColumn = "'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'" .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .Position = 4 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.6") .FormatColumn = "'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'" .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .Position = 5 .Width = 48 .AllowSizing = False End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") End With .ApplyFilter() .EndUpdate() End With |
1301 |
Is it possible to auto-numbering the children items too
Dim h With Exg2antt1 .BeginUpdate() .Chart.set_PaneWidth(True,0) .LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot .Columns.Add("Items") With .Columns.Add("Pos.1") .FormatColumn = "1 rpos ''" .Position = 0 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.2") .FormatColumn = "1 rpos ':'" .Position = 1 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.3") .FormatColumn = "1 rpos ':|A-Z'" .Position = 2 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.4") .FormatColumn = "1 rpos '|A-Z|'" .Position = 3 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.5") .FormatColumn = "'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'" .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .Position = 4 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.6") .FormatColumn = "'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'" .set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1) .Position = 5 .Width = 48 .AllowSizing = False End With With .Items h = .AddItem("Root 1") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") .set_ExpandItem(h,True) h = .AddItem("Root 2") .InsertItem(h,Nothing,"Child 1") .InsertItem(h,Nothing,"Child 2") End With .EndUpdate() End With |